package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MallcategoryMapper;
import com.ruoyi.system.domain.Mallcategory;
import com.ruoyi.system.service.IMallcategoryService;
import com.ruoyi.common.support.Convert;

/**
 * 商城类目 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class MallcategoryServiceImpl implements IMallcategoryService 
{
	@Autowired
	private MallcategoryMapper mallcategoryMapper;

	/**
     * 查询商城类目信息
     * 
     * @param mallcategoryId 商城类目ID
     * @return 商城类目信息
     */
    @Override
	public Mallcategory selectMallcategoryById(Integer mallcategoryId)
	{
	    return mallcategoryMapper.selectMallcategoryById(mallcategoryId);
	}
	
	/**
     * 查询商城类目列表
     * 
     * @param mallcategory 商城类目信息
     * @return 商城类目集合
     */
	@Override
	public List<Mallcategory> selectMallcategoryList(Mallcategory mallcategory)
	{
	    return mallcategoryMapper.selectMallcategoryList(mallcategory);
	}
	
    /**
     * 新增商城类目
     * 
     * @param mallcategory 商城类目信息
     * @return 结果
     */
	@Override
	public int insertMallcategory(Mallcategory mallcategory)
	{
	    return mallcategoryMapper.insertMallcategory(mallcategory);
	}
	
	/**
     * 修改商城类目
     * 
     * @param mallcategory 商城类目信息
     * @return 结果
     */
	@Override
	public int updateMallcategory(Mallcategory mallcategory)
	{
	    return mallcategoryMapper.updateMallcategory(mallcategory);
	}

	/**
     * 删除商城类目对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMallcategoryByIds(String ids)
	{
		return mallcategoryMapper.deleteMallcategoryByIds(Convert.toStrArray(ids));
	}
	
}
